#pragma once

namespace banknamespace
{
	class Keyboard
	{
	public:

		/*class MouseListener
		{
		public:
			virtual bool onUp() = 0;
			virtual bool onDown() = 0;
			virtual bool onClick() = 0;
		}*/

		// GetKeyboardState();
		// VK_SPACE
		// WM_KEYDOWN
		// WM_KEYUP

		//typedef unsigned int ButtonId;

		Keyboard( HWND hWnd );

		bool didGoUp(char key);
		bool didGoUp(int keyCode);
		bool didGoDown(char key);
		bool didGoDown(int keyCode);
		bool isDown(char key);
		bool isDown(int keyCode);

		void update(); // TODO remove if unneeded

		void processMessages(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

	private:
		//static const unsigned int MAX_BUTTONS = 3;
		HWND m_hWnd;
		//holds the up/down value for all keys on keyboard
		bool keystates[256];
		bool pastKeystates[256];
	};

	Keyboard& GetTheKeyboard(HWND hWnd = NULL);
}